<?php

use think\facade\Route;
//miss路由，定义404
Route::miss(function () {
    @header("http/1.1 404 not found");
    @header("status: 404 not found");
    exit();
});


//授权登录
Route::group('login', function () {
    Route::post('/miniAppletLogin', 'login/miniAppletLogin');
});

//支付回调
Route::group('callback', function () {
    Route::rule('/weChatOrder', 'callback/weChatOrder');
    Route::rule('/aliPayOrder', 'callback/aliPayOrder');
});
//订单相关
Route::group('order', function () {
})->middleware('verify');

//个人中心
Route::group('user', function () {
    Route::get('/getUserInfo', 'user/getUserInfo');
    Route::post('/logout', 'user/logout');
})->middleware('verify');


//提现相关
Route::group('draw', function () {
    Route::get('/index', 'draw/index');
    Route::get('/record', 'draw/record');
    Route::get('/getList', 'draw/getList');
    Route::post('/save', 'draw/save');
})->middleware('verify');


//上传
Route::group('uploads', function () {
    Route::rule('/uploadImage', 'uploads/uploadImage');
});
